<?php
	/**
	 * Elgg pel delete a language
	 */
// Load Elgg engine
	require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
	gatekeeper();
	
// Get the current page's owner
	$page_owner = page_owner_entity();
	if ($page_owner === false || is_null($page_owner)){
		$page_owner = $_SESSION['user'];
		set_page_owner($_SESSION['guid']);
	}
	
// Get the langue
	$langguid =get_input("guid");
	if ($lang = get_entity($langguid)){
		if ($lang->canEdit()){
			$area2 = elgg_view_title(elgg_echo('pel:deletelang'));
			$area2 .= elgg_view("pel/forms/deletelang", array('entity' => $lang));
			$body = elgg_view_layout("two_column_left_sidebar", $area1, $area2);
		}
	}

// Display page
	page_draw(sprintf(elgg_echo('pel:deletelang'),$lang->description),$body);
?>